package com.design;

import com.design.util.Md5Util;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ApplicationContext;

import java.text.SimpleDateFormat;
import java.util.Date;

@SpringBootApplication
public class MainApplication {
	public static void main(String[] args) {
		ApplicationContext context = SpringApplication.run(MainApplication.class, args);
		String serverPort = context.getEnvironment().getProperty("server.port");
		String activeFile = context.getEnvironment().getProperty("spring.profiles.active");
		SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
		System.out.println(String.format("【%s】一体化平台启动成功（%s）！！！", format.format(new Date()), activeFile));
		System.out.println(String.format("【%s】服务地址：http://localhost:%s", format.format(new Date()), serverPort));
	}
}
